package com.system.userconsumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author Lisiyu
 * date 2022/10/19 20:10
 * version 1.0
 */
@SpringBootApplication
public class UserStartApp {
    public static void main(String[] args) {
        SpringApplication.run(UserStartApp.class,args);
    }

    @Bean
    @LoadBalanced//开启负载均衡
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
